<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>data选项:定义初始数据</title>
    <script src="../vue.js"></script>
</head>
<body>
<h2>【例2】data选项:定义初始数据---JSON对象</h2>
<hr>
<div id="app">
    <p>称呼：{{name}}，出生地方：{{单位}}</p>
</div>
<script>
    let vm = new Vue({
        el: '#app',
        data: {
            name: '阿诗玛',
            单位: '香格里拉'
        }
    });
    console.log(vm.$data.name);
    console.log(vm.name);
    console.log(vm.$data.单位);
    console.log(vm.单位);
</script>
<hr>
<p><a href="index.html">返回章节目录</a>
    <script>document.write(document.lastModified); </script>
</p>
</body>
</html>
